package com.study_platform.controller;


import com.alibaba.fastjson2.JSONObject;
import com.study_platform.entity.Question;
import com.study_platform.service.TestPaperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author auto
 * @since 2023-04-11
 */
@RestController
@RequestMapping("/study_platform/test-paper")
public class TestPaperController {

    @Resource
    private TestPaperService testPaperService;

    @GetMapping("/create/")
    public JSONObject createTestPaper(@RequestParam String grade,
                                      @RequestParam String size,
                                      @RequestParam String point) {
        return testPaperService.createTestPaper(grade, point, testPaperService.getTestId(), size);
    }
}


